/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.citi.dahg.cve.controller.service;

import com.citi.dahg.cve.controller.SpringPersistence;
import com.citi.dahg.cve.controller.util.Encrypt;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor;

/**
 *
 * @author dh90940
 */
@Interceptors(SpringBeanAutowiringInterceptor.class)
public abstract class AbstractStatelessBeanCVE {
    @Autowired
    @Qualifier("persistence")
    private SpringPersistence persistence;    

    @Autowired
    @Qualifier("encrypt")
    protected Encrypt decrypt;
    
    protected EntityManager getEntityManager() {
        return persistence.getEntityManager();
    }
}
